<?php 
if(!isset($activities['favorite']) || empty($activities['favorite'])){
	echo $this->lang->line('favorite_empty');
}else{
?>
<?php

 foreach($activities['favorite'] as $key=>$val): ?>
<div class="activity_block">
	<div class="activity_mid_thumbnail">
		<?php 
			$val['upload_image'] = json_decode($val['upload_image']);
			echo isset($val['upload_image'][0])?'<img width="180" height="180" src="'.$this->config->item('image_uploader_original', 'layout').$user_id.'/'.$val['upload_image'][0].'">':'<img src="'.$this->config->item('image_public', 'layout').'empty-image.png" width="180" height="180" />';
		?>
	</div>
	<div class="activity_info">
		<div class="info_head">
			<div class="user_image"><img src="<?php echo $this->config->item('image_public', 'layout') ?>noavatar.gif" width="80" height="80" /></div>
			<div class="activity_short_desc">
				<p class="title"><?php echo $val['activity_title']?></p>
				<p><?php echo $val['activity_location']?>/<?php echo $val['activity_category']?></p>
				<p>5分</p>
			</div>
			<div class="activity_action">
				<p id="delete_button"><button onclick="deleteActivity('<?php echo $val['activity_id']; ?>','favorite')">刪除</button></p>
				<p><?php echo $val['activity_price']?>元</p>
			</div>
		</div>
		<div class="info_body">
			<p><?php echo strip_tags($val['desc']) ?></p>
		</div>
	</div>
</div>
<?php endforeach; ?>
<?php } ?>